
def is_perfect_num(num):
    if num <=1:
        return  False
    div_sum=0
    for i in range(1,num):
        if num %i==0:
            div_sum+=i
    return div_sum==num
def print_perfect_num(n):
    for num in range(1,n+1):
        if is_perfect_num(num):
            print(num)
print_perfect_num(100)